package com.resume.crm01.controller;

import com.resume.crm01.model.MonthIncome;
import com.resume.crm01.service.ICourseOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/dataanalysis")
public class DataAnalysisController {
    @Autowired
    ICourseOrderService courseOrderService;

    //获取数据报表的处理过程
    @RequestMapping("/monthincome")
    @ResponseBody
    public List<MonthIncome> monthIncome(){
        return courseOrderService.getMonthIncomes();
    }

    @RequestMapping("/income")
    public String income(){
        return "dataanalysis/income";
    }
}

